package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.vo.TableSettingsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ProductOrderSettingsMapper;
import com.ruoyi.system.domain.ProductOrderSettings;
import com.ruoyi.system.service.IProductOrderSettingsService;

/**
 * 商品点单设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class ProductOrderSettingsServiceImpl implements IProductOrderSettingsService
{
    @Autowired
    private ProductOrderSettingsMapper productOrderSettingsMapper;

    /**
     * 通过id查询商品点单设置
     *
     * @param id 商品点单设置主键
     * @return 商品点单设置
     */
    @Override
    public ProductOrderSettings selectProductOrderSettingsById(Long id)
    {
        return productOrderSettingsMapper.selectProductOrderSettingsById(id);
    }

    /**
     * 查询商品点单设置列表
     *
     * @param productOrderSettings 商品点单设置
     * @return 商品点单设置
     */
    @Override
    public List<ProductOrderSettings> selectProductOrderSettingsList(ProductOrderSettings productOrderSettings)
    {
        return productOrderSettingsMapper.selectProductOrderSettingsList(productOrderSettings);
    }

    /**
     * 新增商品点单设置列表
     *
     * @param productOrderSettings 商品点单设置
     * @return 结果
     */
    @Override
    public int insertProductOrderSettings(ProductOrderSettings productOrderSettings)
    {
        return productOrderSettingsMapper.insertProductOrderSettings(productOrderSettings);
    }

    /**
     * 修改商品点单设置
     *
     * @param productOrderSettings 商品点单设置
     * @return 结果
     */
    @Override
    public int updateProductOrderSettings(ProductOrderSettings productOrderSettings)
    {
        return productOrderSettingsMapper.updateProductOrderSettings(productOrderSettings);
    }

    /**
     * 通过id批量删除商品点单设置信息
     *
     * @param ids 需要删除的商品点单设置主键
     * @return 结果
     */
    @Override
    public int deleteProductOrderSettingsByIds(Long[] ids)
    {
        return productOrderSettingsMapper.deleteProductOrderSettingsByIds(ids);
    }

    /**
     * 通过id删除商品点单设置信息
     *
     * @param id 商品点单设置主键
     * @return 结果
     */
    @Override
    public int deleteProductOrderSettingsById(Long id)
    {
        return productOrderSettingsMapper.deleteProductOrderSettingsById(id);
    }

    @Override
    public ProductOrderSettings selectByStoreId(Long storeId) {
        return productOrderSettingsMapper.selectByStoreId(storeId);
    }
}
